// 常量定义
const age_options = [
    {
        // value: 'UNDER20',
        value: '20岁以下',
        label: '20岁以下'
    },
    {
        // value: 'BETWEEN20AND30',
        value: '20到30岁',
        label: '20到30岁'
    },
    {
        // value: 'BETWEEN30AND40',
        value: '30到40岁',
        label: '30到40岁'
    },
    {
        // value: 'BETWEEN40AND50',
        value: '40到50岁',
        label: '40到50岁'
    },
    {
        // value: 'UPPER50',
        value: '50岁以上',
        label: '50岁以上'
    },
]

const level_options = [
    {
        // value: 'IMPORTANT',
        value: '重要',
        label: '重要'
    },
    {
        // value: 'CORE',
        value: '核心',
        label: '核心'
    },
    {
        // value: 'GENERAL',
        value: '一般',
        label: '一般'
    },
]

const position_options = [
    {
        // value: 'MANAGER',
        value: '高管',
        label: '高管'
    },
    {
        // value: 'BOSS',
        value: '老板',
        label: '老板'
    },
    {
        // value: 'BLOGGER',
        value: '美食博主',
        label: '美食博主'
    },
    {
        // value: 'HOUSEWIFE',
        value: '家庭主妇',
        label: '家庭主妇'
    },
    {
        // value: 'OFFICE',
        value: '上班族',
        label: '上班族'
    },
]

const gender_options = [
    {
        value: 'MALE',
        label: '男性'
    },
    {
        value: 'FEMALE',
        label: '女性'
    },
    {
        // value: 'UNKNOWN',
        value: '未知',
        label: '未知'
    },
]

const mnp_config_category = [
    {
        value: 'BANNER',
        label: '广告'
    },
    {
        value: 'ACTIVITY',
        label: '活动'
    },
    {
        value: 'INTRO',
        label: '商家介绍'
    },
    {
        value: 'SPECIALITY',
        label: '招牌菜'
    },
    {
        value: 'SHARE_FRIEND',
        label: '分享给朋友'
    },
    {
        value: 'SHARE_MOMENT',
        label: '分享到朋友圈'
    },
    {
        value: 'ADD_FAVORITE',
        label: '添加到收藏'
    },
]

const album_category = [
    {
        value: 'ENV',
        label: '环境'
    },
    {
        value: 'VIDEO',
        label: '视频'
    },
    {
        value: 'SPECIALITY',
        label: '招牌菜'
    },
    {
        value: 'OTHERS',
        label: '其它'
    },
]

const shop_labels = [
    {
        value: '免费停车',
        label: '免费停车',
    }, {
        value: '有宝宝椅',
        label: '有宝宝椅',
    }, {
        value: '商务包厢',
        label: '商务包厢',
    }, {
        value: '专业服务',
        label: '专业服务',
    }, {
        value: '充电宝',
        label: '充电宝',
    }, {
        value: '可包场',
        label: '可包场',
    }, {
        value: '特色装修',
        label: '特色装修',
    }, {
        value: '情侣聚会',
        label: '情侣聚会',
    }, {
        value: '老人寿宴',
        label: '老人寿宴',
    }
]

const DATE_TIME_PICKER_OPTIONS = {
    shortcuts: [{
        text: '今天',
        onClick(picker) {
            picker.$emit('pick', new Date());
        }
    }, {
        text: '昨天',
        onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24);
            picker.$emit('pick', date);
        }
    }, {
        text: '一周前',
        onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', date);
        }
    }, {
        text: '一月前',
        onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24 * 30);
            picker.$emit('pick', date);
        }
    }, {
        text: '一年前',
        onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24 * 365);
            picker.$emit('pick', date);
        }
    }, {
        text: '明天',
        onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() + 3600 * 1000 * 24);
            picker.$emit('pick', date);
        }
    }, {
        text: '一周后',
        onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
            picker.$emit('pick', date);
        },
    }, {
        text: '一月后',
        onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() + 3600 * 1000 * 24 * 30);
            picker.$emit('pick', date);
        }
    }, {
        text: '一年后',
        onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() + 3600 * 1000 * 24 * 365);
            picker.$emit('pick', date);
        }
    }]
}

const sms_company_options = [
    {
        value: 'TENCENT',
        label: '腾讯云',
    }, {
        value: 'FEIGE',
        label: '飞鸽传书',
    }, {
        value: 'DAHAN_TRICOM',
        label: '大汉三通',
    }
]

const sms_type_options = [
    {
        value: 'NOTICE',
        label: '通知短信',
    }, {
        value: 'MARKETING',
        label: '营销短信',
    }, {
        value: 'VERIFY',
        label: '验证码短信',
    }
]

const member_card_activity_options = [
    {
        value: 'APPLY_GIFT',
        label: '入会礼',
    }, {
        value: 'BIRTHDAY_GIFT',
        label: '生日礼',
    }, {
        value: 'FESTIVAL_GIFT',
        label: '节日礼',
    }, {
        value: 'GROUP_GIFT',
        label: '入群礼',
    }, {
        value: 'UPGRADE_GIFT',
        label: '升级礼',
    }
]

const cpc_fields = [
    {
        "label": "花费",
        "prop": "t30001",
        "desc": "广告花费，包括现金、红包和折扣券优惠。实时更新",
        "width": 90,
    },
    {
        "label": "团单量",
        "prop": "t30020",
        "desc": "用户点击广告后，进入门店详情页、团购详情页，购买的团购订单量（团购是否验券与团购订单量无关）。次日更新",
        "width": 100,
    },
    {
        "label": "单笔团单成本",
        "prop": "u10004",
        "desc": "单笔团单成本=花费/团单量。次日更新",
        "width": 130,
    },
    {
        "label": "订单量",
        "prop": "t30029",
        "desc": "广告带来的订单个数之和，具体包括团购订单量、闪惠买单量、智能支付订单量、优惠预订订单量（休娱）、泛商品订单量、酒店预订量、医美预付商品订单量、储值卡订单量；不包括会员卡订单量。次日更新",
        "width": 100,
    },
    {
        "label": "曝光",
        "prop": "t30002",
        "desc": "广告展现在美团和点评客户端后，实际被用户看到的次数。实时更新",
        "width": 90,
    },
    {
        "label": "千次曝光成本",
        "prop": "u10cpm",
        "desc": "广告每千次曝光所需要的成本。实时更新",
        "width": 130,
    },
    {
        "label": "点击",
        "prop": "t30003",
        "desc": "广告展现在美团和点评客户端后，实际被用户看到并且点击的次数；去除作弊的点击、销售的点击等。实时更新",
        "width": 90,
    },
    {
        "label": "点击率",
        "prop": "u10001",
        "desc": "点击率=点击/曝光",
        "width": 100,
    },
    {
        "label": "点击均价",
        "prop": "t30004",
        "desc": "点击均价=花费/点击，表示每一次广告点击（含关键词定向）的平均价格。实时更新",
        "width": 110,
    },
    {
        "label": "浏览量",
        "prop": "t30005",
        "desc": "用户点击广告后，浏览门店详情页、团购详情页的次数之和。一段时间内，用户反复点击广告时，广告点击次数计算一次，浏览量计算多次。次日更新",
        "width": 110,
    },
    {
        "label": "浏览率",
        "prop": "u10002",
        "desc": "浏览率=浏览量/曝光",
        "width": 110,
    },
    {
        "label": "感兴趣",
        "prop": "t30026",
        "desc": "用户点击广告后进入商户详情页或团购详情页的各类行为次数之和，具体包括：查看图片、查看评论、查看优惠促销、查看推荐菜等。次日更新",
        "width": 110,
    },
    {
        "label": "感兴趣率",
        "prop": "u10003",
        "desc": "感兴趣率=感兴趣/浏览量",
        "width": 110,
    },
    {
        "label": "查看图片",
        "prop": "t30006",
        "desc": "用户点击广告后，进入门店详情页、团购详情页，点击查看图片的总次数，包含门店图片、网友相册、官方相册、视频、评论中的图片等。当同一用户在同一日多次点击查看图片，数据计算多次。次日更新",
        "width": 110,
    },
    {
        "label": "查看评论",
        "prop": "t30007",
        "desc": "用户点击广告后，进入门店详情页、团购详情页、丽人的手艺人详情页，点击查看网友点评模块信息的总次数。当同一用户在同一日多次点击查看网友点评信息，数据计算多次。次日更新",
        "width": 110,
    },
    {
        "label": "查看团购",
        "prop": "t30009",
        "desc": "用户点击广告后，进入门店详情页、丽人的手艺人详情页，点击查看团购模块信息的总次数。当同一用户在同一日多次点击查看团购信息，数据计算多次。次日更新",
        "width": 110,
    },
    {
        "label": "分享",
        "prop": "t30011",
        "desc": "用户点击广告后，进入门店详情页、团购详情页、丽人的手艺人详情页，点击分享、转发按钮的总次数。当同一用户在同一日多次分享、转发商户页面，数据计算多次。次日更新",
        "width": 100,
    },
    {
        "label": "收藏",
        "prop": "t30012",
        "desc": "用户点击广告后，进入门店详情页、团购详情页、丽人的手艺人详情页，点击收藏按钮的总次数。当同一用户在同一日多次收藏商户页面，数据计算多次。次日更新",
        "width": 100,
    },
    {
        "label": "查看地址",
        "prop": "t30013",
        "desc": "用户点击广告后，进入门店详情页、团购详情页，点击门店地址进入地图查看门店位置的总次数。当同一用户在同一日多次点击门店地址，数据计算多次。次日更新",
        "width": 110,
    },
    {
        "label": "查看电话",
        "prop": "t30014",
        "desc": "用户点击广告后，进入门店详情页、团购详情页，点击商户电话的用户总数，仅针对用户的点击电话按钮的行为，用户是否拨通商户电话与电话点击次数无关。当同一用户在同一日多次点击商户电话，数据计算多次。次日更新",
        "width": 110,
    },
    {
        "label": "优惠促销领取",
        "prop": "t30021",
        "desc": "用户点击广告后，进入门店详情页，成功领取优惠促销的次数（用户是否使用优惠促销与优惠促销领取次数无关）。次日更新",
        "width": 130,
    },
    {
        "label": "闪惠买单量",
        "prop": "t30022",
        "desc": "用户点击广告后，进入门店详情页，成功使用闪惠买单的次数。次日更新",
        "width": 120,
    },
    {
        "label": "查看推荐菜",
        "prop": "t30028",
        "desc": "用户点击广告后，进入门店详情页，点击查看推荐菜信息的总次数。当同一用户在同一日多次点击查看推荐菜信息，数据计算多次。次日更新",
        "width": 120,
    },
]

const kol_labels = [
    {
        value: '颜值在线',
        label: '颜值在线',
    }, {
        value: '出片好',
        label: '出片好',
    }, {
        value: '自带相机',
        label: '自带相机',
    }, {
        value: '粉丝多',
        label: '粉丝多',
    }, {
        value: '老万粉',
        label: '老万粉',
    }, {
        value: '新万粉',
        label: '新万粉',
    }, {
        value: '红V作者',
        label: '红V作者',
    }, {
        value: '8W+粉(S级)',
        label: '8W+粉(S级)',
    }, {
        value: '5-8W粉(A级)',
        label: '5-8W粉(A级)',
    }, {
        value: '3-5W粉(B级)',
        label: '3-5W粉(B级)',
    }, {
        value: '1-3W粉(C级)',
        label: '1-3W粉(C级)',
    }, {
        value: '5千-1W粉(D级)',
        label: '5千-1W粉(D级)',
    }, {
        value: '0-5千粉(E级)',
        label: '0-5千粉(E级)',
    }
]

const cpc_time_options = [
    {
        label: '上午闲时',
        options: [
            {
                value: 0,
                label: '00-01',
            }, {
                value: 1,
                label: '01-02',
            }, {
                value: 2,
                label: '02-03',
            }, {
                value: 3,
                label: '03-04',
            }, {
                value: 4,
                label: '04-05',
            }, {
                value: 5,
                label: '05-06',
            }, {
                value: 6,
                label: '06-07',
            }, {
                value: 7,
                label: '07-08',
            }, {
                value: 8,
                label: '08-09',
            },
            {
                value: 9,
                label: '09-10',
            }]
    }, {
        label: '午市高峰',
        options: [
            {
                value: 10,
                label: '10-11',
            }, {
                value: 11,
                label: '11-12',
            }, {
                value: 12,
                label: '12-13',
            }, {
                value: 13,
                label: '13-14',
            }]
    }, {
        label: '下午闲时',
        options: [
            {
                value: 14,
                label: '14-15',
            }, {
                value: 15,
                label: '15-16',
            }, {
                value: 16,
                label: '16-17',
            }]
    }, {
        label: '晚市高峰',
        options: [
            {
                value: 17,
                label: '17-18',
            }, {
                value: 18,
                label: '18-19',
            }, {
                value: 19,
                label: '19-20',
            }, {
                value: 20,
                label: '20-21',
            }]
    }, {
        label: '夜宵',
        options: [
            {
                value: 21,
                label: '21-22',
            }, {
                value: 22,
                label: '22-23',
            }, {
                value: 23,
                label: '23-24',
            }]
    }
]

// 分析日期范围选择
const analysis_date_options = {
    disabledDate(time) {
        return time.getTime() > Date.now() - 24 * 60 * 60 * 1000;
    },
    shortcuts: [{
        text: '昨天',
        onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
            end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
            picker.$emit('pick', [start, end]);
        }
    }, {
        text: '最近一周',
        onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', [start, end]);
        }
    }, {
        text: '最近一个月',
        onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
            picker.$emit('pick', [start, end]);
        }
    }, {
        text: '最近三个月',
        onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
            picker.$emit('pick', [start, end]);
        }
    }]
}

export default {
    age_options,
    level_options,
    position_options,
    gender_options,
    mnp_config_category,
    album_category,
    shop_labels,
    DATE_TIME_PICKER_OPTIONS,
    sms_company_options,
    sms_type_options,
    member_card_activity_options,
    cpc_fields,
    cpc_time_options,
    analysis_date_options,
    kol_labels,
}

